package anim;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class AnimFragmentStatus
{
    public static final Logger logger = LoggerFactory.getLogger(AnimFragmentStatus.class);
    public Matrix3D status;
    public Interpolation interpolation;
    private int fps;
    int frameId;
    float frameTime;

    public AnimFragmentStatus(float frameTime, Matrix3D matrix3D, Interpolation interpolation, int fps)
    {
        this.fps = fps;
        this.frameTime = frameTime;
        this.frameId = Math.round(this.frameTime / (1.0f / fps));
        this.status = matrix3D;
        this.interpolation = interpolation;
    }

    private AnimFragmentStatus()
    {
    }

    @Override
    public AnimFragmentStatus clone()
    {
        AnimFragmentStatus copy = new AnimFragmentStatus();
        copy.fps = this.fps;
        copy.frameTime = frameTime;
        copy.frameId = this.frameId;
        copy.status = status.clone();
        copy.interpolation = interpolation;
        return copy;
    }
}
